Method and apparatus for secure interaction between terminals

ABSTRACT

A method and an apparatus for secure interaction between terminals, where the method includes indicating or indirectly indicating, by a companion terminal with an embedded Universal Integrated Circuit Card (eUICC), a Hypertext Transfer Protocol (HTTP) over Secure Socket Layer (HTTPS) Uniform Resource Locator (URL) including security information to a primary terminal such that the primary terminal initiates establishment of a local Transport Layer Security (TLS) connection according to the HTTPS URL, receiving, by the companion terminal, an HTTP request from the primary terminal using the local TLS connection, completing establishment of an HTTPS session when the companion terminal determines that the HTTP request includes the security information, and receiving, by the companion terminal, an operation instruction for the eUICC from the primary terminal using the HTTPS session.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a U.S. National Stage of International PatentApplication No. PCT/CN2015/096184 filed on Dec. 1, 2015, which is herebyincorporated by reference in its entirety.

TECHNICAL FIELD

The present disclosure relates to the field of communicationstechnologies, and in particular, to a method and an apparatus for secureinteraction between terminals.

BACKGROUND

An embedded Universal Integrated Circuit Card (eUICC) is athird-generation telecommunications smart card, and can support remoteconfiguration and management of operator data. The eUICC is usuallyintegrated in a terminal. However, some terminals are limited bycapacities of the terminals, and consequently cannot directly perform anoperation such as downloading or activation of a configuration file(profile) in the eUICC. For example, an eUICC-integrated terminal(hereinafter referred to as a companion terminal) whose user interface(UI) is limited and that initially has no cellular network accesscapability needs to access a network with the help of a primaryterminal, and the primary terminal provides a UI to complete operationssuch as downloading and activation of the profile.

To ensure security of the profile in the companion terminal and avoidrisks such as deletion, forgery, and modification that are performed, byan unauthorized terminal, on the profile in the companion terminal,before the primary terminal performs an operation on the profile in thecompanion terminal, a solution for secure interaction between theprimary terminal and the companion terminal needs to be developed.Currently, there is still no solution for secure interaction between theprimary terminal and the companion terminal.

SUMMARY

Embodiments of the present disclosure provide a method and an apparatusfor secure interaction between terminals in order to provide a solutionfor secure interaction between a primary terminal and a companionterminal.

An embodiment of the present disclosure provides a method for secureinteraction between terminals, and the method includes indicating orindirectly indicating, by a companion terminal with an eUICC, aHypertext Transfer Protocol (HTTP) over Secure Socket Layer (HTTPS)Uniform Resource Locator (URL) including security information to aprimary terminal such that the primary terminal establishes a localTransport Layer Security (TLS) connection to the companion terminalbased on a certificate authentication manner according to the HTTPS URL,receiving, by the companion terminal, an HTTP request that is sent bythe primary terminal using the local TLS connection, and if thecompanion terminal determines that the HTTP request includes thesecurity information, returning an HTTP response to the primary terminalin order to complete establishment of an HTTPS session, and receiving,by the companion terminal, an operation instruction for the eUICC thatis sent by the primary terminal using the HTTPS session.

Optionally, indicating or indirectly indicating, by a companionterminal, an HTTPS URL including security information to a primaryterminal includes transferring, by the companion terminal, the HTTPS URLincluding the security information to the primary terminal, directlydisplaying, by the companion terminal, the HTTPS URL including thesecurity information in order to indirectly indicate the HTTPS URL tothe primary terminal, or displaying, by the companion terminal, a graphof the HTTPS URL including the security information in order toindirectly indicate the HTTPS URL to the primary terminal.

An embodiment of the present disclosure provides a method for secureinteraction between terminals, and the method includes obtaining, by aprimary terminal, an HTTPS URL that includes security information andthat is indicated or indirectly indicated by a companion terminal withan eUICC, establishing, by the primary terminal, a local TLS connectionto the companion terminal based on a certificate authentication manneraccording to the HTTPS URL, sending an HTTP request including thesecurity information to the companion terminal using the local TLSconnection, and completing establishment of an HTTPS session afterreceiving an HTTP response returned by the companion terminal, andsending, by the primary terminal, an operation instruction for the eUICCto the companion terminal using the HTTPS session.

An embodiment of the present disclosure provides a method for secureinteraction between terminals, and the method includes indicating orindirectly indicating, by a companion terminal with an eUICC, an HTTPURL including first security information to a primary terminal, if thecompanion terminal receives an HTTP request that is sent by the primaryterminal using a first HTTPS URL including the first securityinformation, returning the HTTPS URL to the primary terminal such thatthe primary terminal initiates establishment of an HTTPS sessionaccording to the HTTPS URL, and receiving, by the companion terminalusing the HTTPS session, an operation instruction for the eUICC that issent by the primary terminal.

Optionally, indicating or indirectly indicating, by a companionterminal, an HTTP URL including first security information to a primaryterminal includes transferring, by the companion terminal, the HTTP URLincluding the first security information to the primary terminal, ordirectly displaying, by the companion terminal, the HTTP URL includingthe first security information in order to indirectly indicate the HTTPURL to the primary terminal, or displaying, by the companion terminal, agraph of the HTTP URL including the first security information in orderto indirectly indicate the HTTP URL to the primary terminal.

Optionally, after the companion terminal receives an HTTP request thatis sent by the primary terminal using a first HTTP URL including thefirst security information, the method further includes returning, bythe companion terminal and to the primary terminal, a second HTTP URLused for downloading a certification authority (CA) root certificate,where the CA root certificate is used by the primary terminal toestablish a local TLS connection to the companion terminal based on acertificate authentication manner.

Optionally, after returning, by the companion terminal, the HTTPS URL tothe primary terminal, the method further includes receiving, by thecompanion terminal, a Transmission Control Protocol (TCP) connectionrequest that is sent by the primary terminal according to the HTTPS URL,and responding to the TCP connection request in order to complete TCPconnection establishment if the companion terminal determines that asource Internet Protocol (IP) address of the TCP connection request isthe same as a source IP address of the HTTP request.

Optionally, the HTTPS URL includes second security information, andbefore receiving, by the companion terminal using the HTTPS session, anoperation instruction for the eUICC that is sent by the primaryterminal, the method further includes completing establishment of theHTTPS session if the companion terminal determines that the secondsecurity information sent by the primary terminal is received.

An embodiment of the present disclosure provides a method for secureinteraction between terminals, and the method includes obtaining, by aprimary terminal, a first HTTP URL that includes first securityinformation and that is indicated or indirectly indicated by a companionterminal with an eUICC, sending, by the primary terminal, an HTTPrequest including the first HTTP URL to the companion terminal, wherethe first HTTP URL includes the first security information, receiving,by the primary terminal, an HTTPS URL that is sent by the companionterminal to the primary terminal according to the HTTP request,initiating establishment of an HTTPS session according to the HTTPS URL,and sending, by the primary terminal, an operation instruction for theeUICC to the companion terminal using the HTTPS session.

Optionally, obtaining, by a primary terminal, a first HTTP URL thatincludes first security information and that is indicated or indirectlyindicated by a companion terminal with an eUICC includes receiving, bythe primary terminal, the HTTP URL that includes the first securityinformation and that is transferred by the companion terminal,obtaining, by the companion terminal, the HTTP URL using the HTTP URLthat includes the first security information and that is directlydisplayed by the companion terminal, or obtaining, by the companionterminal, the HTTP URL by scanning a graph of the HTTP URL including thefirst security information.

Optionally, after sending, by the primary terminal, an HTTP requestincluding the first HTTP URL to the companion terminal, the methodfurther includes receiving, by the primary terminal, a second HTTP URLthat is used for downloading a CA root certificate and that is sent bythe companion terminal, and establishing a local TLS connection to thecompanion terminal according to the CA root certificate based on acertificate authentication manner.

Optionally, after receiving, by the primary terminal, an HTTPS URL thatis sent by the companion terminal to the primary terminal according tothe HTTP request including the first security information, the methodfurther includes sending, by the primary terminal, a TCP connectionrequest to the companion terminal according to the HTTPS URL such thatthe companion terminal responds to the TCP connection request accordingto a source IP address of the TCP connection request and a source IPaddress of the HTTP request.

Optionally, the HTTPS URL includes second security information, andbefore sending, by the primary terminal, an operation instruction forthe eUICC to the companion terminal using the HTTPS session, the methodfurther includes sending, by the primary terminal, the second securityinformation to the companion terminal such that the companion terminalcompletes establishment of the HTTPS session after receiving the secondsecurity information.

An embodiment of the present disclosure provides a method for secureinteraction between terminals, and the method includes indicating orindirectly indicating, by a companion terminal with an eUICC, addressinformation and security information of the companion terminal to aprimary terminal such that the primary terminal establishes a localsecurity application session according to the address information andthe security information, and receiving, by the companion terminal usingthe local security application session, an operation instruction for theeUICC that is sent by the primary terminal.

Optionally, indicating or indirectly indicating, by a companionterminal, address information and security information of the companionterminal to a primary terminal includes transferring, by the companionterminal, the address information and the security information to theprimary terminal, directly displaying, by the companion terminal, theaddress information and the security information in order to indirectlyindicate the address information and the security information to theprimary terminal, or displaying, by the companion terminal, a graphincluding the address information and the security information in orderto indirectly indicate the address information and the securityinformation to the primary terminal.

Optionally, the security information is used as a pre-shared key suchthat the companion terminal and the primary terminal perform mutualauthentication using the pre-shared key and establish a local securityapplication session.

Optionally, after indicating or indirectly indicating, by a companionterminal with an eUICC, address information and security information ofthe companion terminal to a primary terminal, the method furtherincludes receiving, by the companion terminal, a local securityapplication session request of the primary terminal, and using obtainedkey information of a local connection as a pre-shared key, and after thecompanion terminal and the primary terminal perform mutualauthentication using the pre-shared key, if security information sent bythe primary terminal is received, completing establishment of the localsecurity application session.

An embodiment of the present disclosure provides a method for secureinteraction between terminals, and the method includes obtaining, by aprimary terminal, address information and security information that areindicated or indirectly indicated by a companion terminal with an eUICCto the primary terminal, establishing, by the primary terminal, a localsecurity application session according to the address information andthe security information, and sending, by the primary terminal, anoperation instruction for the eUICC to the companion terminal using thelocal security application session.

Optionally, obtaining, by a primary terminal, address information andsecurity information that are indicated or indirectly indicated by acompanion terminal with an eUICC to the primary terminal includesreceiving, by the primary terminal, the address information and thesecurity information that are transferred by the companion terminal,obtaining, by the companion terminal, the address information and thesecurity information using the address information and the securityinformation that are directly displayed by the companion terminal, orobtaining, by the companion terminal, the address information and thesecurity information by scanning a graph including the addressinformation and the security information.

Optionally, the security information is used as a pre-shared key suchthat the primary terminal and the companion terminal perform mutualauthentication according to the pre-shared key and establish a localsecurity application session.

Optionally, establishing, by the primary terminal, a local securityapplication session according to the address information and thesecurity information includes sending, by the primary terminal, a localsecurity application session request to the companion terminal, andusing obtained key information of a local connection as a pre-sharedkey, and after the primary terminal and the companion terminal performmutual authentication using the pre-shared key, sending the securityinformation to the companion terminal such that the companion terminalcompletes establishment of the local security application session afterdetermining that the security information sent by the primary terminalis received.

An embodiment of the present disclosure provides an apparatus for secureinteraction between terminals, and the apparatus includes a processorconfigured to indicate or indirectly indicate an HTTPS URL includingsecurity information to a primary terminal such that the primaryterminal establishes a local TLS connection to the companion terminalbased on a certificate authentication manner according to the HTTPS URL,and a transceiver configured to receive an HTTP request that is sent bythe primary terminal using the local TLS connection, and if thecompanion terminal determines that the HTTP request includes thesecurity information, return an HTTP response to the primary terminal inorder to complete establishment of an HTTPS session, and receive anoperation instruction for the eUICC that is sent by the primary terminalusing the HTTPS session.

Optionally, the processor is further configured to transfer the HTTPSURL including the security information to the primary terminal, directlydisplay the HTTPS URL including the security information in order toindirectly indicate the HTTPS URL to the primary terminal, or display agraph of the HTTPS URL including the security information in order toindirectly indicate the HTTPS URL to the primary terminal.

An embodiment of the present disclosure provides an apparatus for secureinteraction between terminals, and the apparatus includes a processorconfigured to obtain an HTTPS URL that includes security information andthat is indicated or indirectly indicated by a companion terminal withan eUICC, and establish a local TLS connection to the companion terminalbased on a certificate authentication manner according to the HTTPS URL,send an HTTP request including the security information to the companionterminal using the local TLS connection, and complete establishment ofan HTTPS session after receiving an HTTP response returned by thecompanion terminal, and a transceiver configured to send an operationinstruction for the eUICC to the companion terminal using the HTTPSsession.

An embodiment of the present disclosure provides an apparatus for secureinteraction between terminals, and the apparatus includes a processorconfigured to indicate or indirectly indicate an HTTP URL includingfirst security information to a primary terminal, and a transceiverconfigured to return the HTTPS URL to the primary terminal such that theprimary terminal initiates establishment of an HTTPS session accordingto the HTTPS URL if an HTTP request that is sent by the primary terminalusing a first HTTPS URL including the first security information isreceived, and receive, using the HTTPS session, an operation instructionfor the eUICC that is sent by the primary terminal.

Optionally, the processor is further configured to transfer the HTTP URLincluding the first security information to the primary terminal,directly display the HTTP URL including the first security informationin order to indirectly indicate the HTTP URL to the primary terminal, ordisplay a graph of the HTTP URL including the first security informationin order to indirectly indicate the HTTP URL to the primary terminal.

Optionally, the transceiver is further configured to return, to theprimary terminal, a second HTTP URL used for downloading a CA rootcertificate, where the CA root certificate is used by the primaryterminal to establish a local TLS connection to the companion terminalbased on a certificate authentication manner.

Optionally, the transceiver is further configured to receive a TCPconnection request that is sent by the primary terminal according to theHTTPS URL, and if a source IP address of the TCP connection request isthe same as a source IP address of the HTTP request, respond to the TCPconnection request in order to complete TCP connection establishment.

Optionally, the HTTPS URL includes second security information, and thetransceiver is configured to if the second security information sent bythe primary terminal is received, complete establishment of the HTTPSsession.

An embodiment of the present disclosure provides an apparatus for secureinteraction between terminals, and the apparatus includes a processorconfigured to obtain a first HTTP URL that includes first securityinformation and that is indicated or indirectly indicated by a companionterminal with an eUICC, and a transceiver configured to send an HTTPrequest including the first HTTP URL to the companion terminal, wherethe first HTTP URL includes the first security information, and receivean HTTPS URL that is sent by the companion terminal to the primaryterminal according to the HTTP request, and initiate establishment of anHTTPS session according to the HTTPS URL, and send an operationinstruction for the eUICC to the companion terminal using the HTTPSsession.

Optionally, the processor is further configured to receive the HTTP URLthat includes the first security information and that is transferred bythe companion terminal, obtain the HTTP URL using the HTTP URL thatincludes the first security information and that is directly displayedby the companion terminal, or obtain the HTTP URL by scanning a graph ofthe HTTP URL including the first security information.

Optionally, the transceiver is further configured to receive a secondHTTP URL that is used for downloading a CA root certificate and that issent by the companion terminal, and establish a local TLS connection tothe companion terminal according to the CA root certificate based on acertificate authentication manner.

Optionally, after the primary terminal receives the HTTPS URL that issent by the companion terminal to the primary terminal according to theHTTP request including the first security information, the transceiveris further configured to send a TCP connection request to the companionterminal according to the HTTPS URL such that the companion terminalresponds to the TCP connection request according to a source IP addressof the TCP connection request and a source IP address of the HTTPrequest.

Optionally, the HTTPS URL includes second security information, and thetransceiver is configured to send the second security information to thecompanion terminal such that the companion terminal completesestablishment of the HTTPS session after receiving the second securityinformation.

An embodiment of the present disclosure provides an apparatus for secureinteraction between terminals, and the apparatus includes a processorconfigured to indicate or indirectly indicate address information andsecurity information of a companion terminal to a primary terminal suchthat the primary terminal establishes a local security applicationsession according to the address information and the securityinformation, and a transceiver configured to receive, using the localsecurity application session, an operation instruction for the eUICCthat is sent by the primary terminal.

Optionally, the processor is further configured to transfer the addressinformation and the security information to the primary terminal,directly display the address information and the security information inorder to indirectly indicate the address information and the securityinformation to the primary terminal, or display a graph including theaddress information and the security information in order to indirectlyindicate the address information and the security information to theprimary terminal.

Optionally, the security information is used as a pre-shared key suchthat the companion terminal and the primary terminal perform mutualauthentication using the pre-shared key and establish a local securityapplication session.

Optionally, the transceiver is further configured to receive a localsecurity application session request of the primary terminal, and useobtained key information of a local connection as a pre-shared key, andafter the companion terminal and the primary terminal perform mutualauthentication using the pre-shared key, if security information sent bythe primary terminal is received, complete establishment of the localsecurity application session.

An embodiment of the present disclosure provides an apparatus for secureinteraction between terminals, and the apparatus includes a processorconfigured to obtain address information and security information thatare indicated or indirectly indicated by a companion terminal with aneUICC to a primary terminal, and establish a local security applicationsession according to the address information and the securityinformation, and a transceiver configured to send an operationinstruction for the eUICC to the companion terminal using the localsecurity application session.

Optionally, the processor is further configured to receive the addressinformation and the security information that are transferred by thecompanion terminal, obtain the address information and the securityinformation using the address information and the security informationthat are directly displayed by the companion terminal, or obtain theaddress information and the security information by scanning a graphincluding the address information and the security information.

Optionally, the security information is used as a pre-shared key suchthat the primary terminal and the companion terminal perform mutualauthentication according to the pre-shared key and establish a localsecurity application session.

Optionally, the processor is further configured to send a local securityapplication session request to the companion terminal, and use obtainedkey information of a local connection as a pre-shared key, and after theprimary terminal and the companion terminal perform mutualauthentication using the pre-shared key, send the security informationto the companion terminal such that the companion terminal completesestablishment of the local security application session afterdetermining that the security information sent by the primary terminalis received.

An embodiment of the present disclosure provides an apparatus for secureinteraction between terminals, and the apparatus includes a processingunit configured to indicate or indirectly indicate an HTTPS URLincluding security information to a primary terminal such that theprimary terminal establishes a local TLS connection to the companionterminal based on a certificate authentication manner according to theHTTPS URL, and a transceiver unit configured to receive an HTTP requestthat is sent by the primary terminal using the local TLS connection, andif the companion terminal determines that the HTTP request includes thesecurity information, return an HTTP response to the primary terminal inorder to complete establishment of an HTTPS session, and receive anoperation instruction for the eUICC that is sent by the primary terminalusing the HTTPS session.

Optionally, the processing unit is further configured to transfer theHTTPS URL including the security information to the primary terminal,directly display the HTTPS URL including the security information inorder to indirectly indicate the HTTPS URL to the primary terminal, ordisplay a graph of the HTTPS URL including the security information inorder to indirectly indicate the HTTPS URL to the primary terminal.

An embodiment of the present disclosure provides an apparatus for secureinteraction between terminals, and the apparatus includes a processingunit configured to obtain an HTTPS URL that includes securityinformation and that is indicated or indirectly indicated by a companionterminal with an eUICC, and establish a local TLS connection to thecompanion terminal based on a certificate authentication manneraccording to the HTTPS URL, send an HTTP request including the securityinformation to the companion terminal using the local TLS connection,and complete establishment of an HTTPS session after receiving an HTTPresponse returned by the companion terminal, and a transceiver unitconfigured to send an operation instruction for the eUICC to thecompanion terminal using the HTTPS session.

An embodiment of the present disclosure provides an apparatus for secureinteraction between terminals, and the apparatus includes a processingunit configured to indicate or indirectly indicate an HTTP URL includingfirst security information to a primary terminal, and a transceiver unitconfigured to if an HTTP request that is sent by the primary terminalusing a first HTTPS URL including the first security information isreceived, return the HTTPS URL to the primary terminal such that theprimary terminal initiates establishment of an HTTPS session accordingto the HTTPS URL, and receive, using the HTTPS session, an operationinstruction for the eUICC that is sent by the primary terminal.

Optionally, the processing unit is further configured to transfer theHTTP URL including the first security information to the primaryterminal, directly display the HTTP URL including the first securityinformation in order to indirectly indicate the HTTP URL to the primaryterminal, or display a graph of the HTTP URL including first securityinformation in order to indirectly indicate the HTTP URL to the primaryterminal.

Optionally, the transceiver unit is further configured to return, to theprimary terminal, a second HTTP URL used for downloading a CA rootcertificate, where the CA root certificate is used by the primaryterminal to establish a local TLS connection to the companion terminalbased on a certificate authentication manner.

Optionally, the transceiver unit is further configured to receive a TCPconnection request that is sent by the primary terminal according to theHTTPS URL, and if a source IP address of the TCP connection request isthe same as a source IP address of the HTTP request, respond to the TCPconnection request in order to complete TCP connection establishment.

Optionally, the HTTPS URL includes second security information, and thetransceiver unit is configured to complete establishment of the HTTPSsession if the second security information sent by the primary terminalis received.

An embodiment of the present disclosure provides an apparatus for secureinteraction between terminals, and the apparatus includes a processingunit configured to obtain a first HTTP URL that includes first securityinformation and that is indicated or indirectly indicated by a companionterminal with an eUICC, and a transceiver unit configured to send anHTTP request including the first HTTP URL to the companion terminal,where the first HTTP URL includes the first security information, andreceive an HTTPS URL that is sent by the companion terminal to theprimary terminal according to the HTTP request, and initiateestablishment of an HTTPS session according to the HTTPS URL, and sendan operation instruction for the eUICC to the companion terminal usingthe HTTPS session.

Optionally, the processing unit is further configured to receive theHTTP URL that includes the first security information and that istransferred by the companion terminal, obtain the HTTP URL using theHTTP URL that includes the first security information and that isdirectly displayed by the companion terminal, or obtain the HTTP URL byscanning a graph of the HTTP URL including the first securityinformation.

Optionally, the transceiver unit is further configured to receive asecond HTTP URL that is used for downloading a CA root certificate andthat is sent by the companion terminal, and establish a local TLSconnection to the companion terminal according to the CA rootcertificate based on a certificate authentication manner.

Optionally, after the primary terminal receives the HTTPS URL that issent by the companion terminal to the primary terminal according to theHTTP request including the first security information, the transceiverunit is further configured to send a TCP connection request to thecompanion terminal according to the HTTPS URL such that the companionterminal responds to the TCP connection request according to a source IPaddress of the TCP connection request and a source IP address of theHTTP request.

Optionally, the HTTPS URL includes second security information, and thetransceiver unit is configured to send the second security informationto the companion terminal such that the companion terminal completesestablishment of the HTTPS session after receiving the second securityinformation.

An embodiment of the present disclosure provides an apparatus for secureinteraction between terminals, and the apparatus includes a processingunit configured to indicate or indirectly indicate address informationand security information of a companion terminal to a primary terminalsuch that the primary terminal establishes a local security applicationsession according to the address information and the securityinformation, and a transceiver unit configured to receive, using thelocal security application session, an operation instruction for theeUICC that is sent by the primary terminal.

Optionally, the processing unit is further configured to transfer theaddress information and the security information to the primaryterminal, directly display the address information and the securityinformation in order to indirectly indicate the address information andthe security information to the primary terminal, or display a graphincluding the address information and the security information in orderto indirectly indicate the address information and the securityinformation to the primary terminal.

Optionally, the security information is used as a pre-shared key suchthat the companion terminal and the primary terminal perform mutualauthentication using the pre-shared key and establish a local securityapplication session.

Optionally, the transceiver unit is further configured to receive alocal security application session request of the primary terminal, anduse obtained key information of a local connection as a pre-shared key,and after the companion terminal and the primary terminal perform mutualauthentication using the pre-shared key, if security information sent bythe primary terminal is received, complete establishment of the localsecurity application session.

An embodiment of the present disclosure provides an apparatus for secureinteraction between terminals, and the apparatus includes a processingunit configured to obtain address information and security informationthat are indicated or indirectly indicated by a companion terminal withan eUICC to a primary terminal, and establish a local securityapplication session according to the address information and thesecurity information, and a transceiver unit configured to send anoperation instruction for the eUICC to the companion terminal using thelocal security application session.

Optionally, the processing unit is further configured to receive theaddress information and the security information that are transferred bythe companion terminal, obtain the address information and the securityinformation using the address information and the security informationthat are directly displayed by the companion terminal, or obtain theaddress information and the security information by scanning a graphincluding the address information and the security information.

Optionally, the security information is used as a pre-shared key suchthat the primary terminal and the companion terminal perform mutualauthentication using the pre-shared key and establish a local securityapplication session.

Optionally, the processing unit is further configured to send a localsecurity application session request to the companion terminal, and useobtained key information of a local connection as a pre-shared key, andafter the primary terminal and the companion terminal perform mutualauthentication using the pre-shared key, send the security informationto the companion terminal such that the companion terminal completesestablishment of the local security application session afterdetermining that the security information sent by the primary terminalis received.

According to the method and the apparatus that are provided in theembodiments of the present disclosure, a companion terminal with aneUICC performs permission authentication on a primary terminal usingsecurity information, and the primary terminal performs identityauthentication on the companion terminal using a root certificate of thecompanion terminal, and then an operation instruction for the eUICC issent and received between the primary terminal and the companionterminal using an HTTPS session, thereby improving confidentiality andintegrity of an operation command in a transmission process.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic flowchart of a method for secure interactionbetween terminals according to an embodiment of the present disclosure;

FIG. 2 is a schematic flowchart of a method for secure interactionbetween terminals according to an embodiment of the present disclosure;

FIG. 3 is a schematic flowchart of a method for secure interactionbetween terminals according to an embodiment of the present disclosure;

FIG. 4 is a schematic structural diagram of an apparatus for secureinteraction between terminals according to an embodiment of the presentdisclosure;

FIG. 5 is a schematic structural diagram of an apparatus for secureinteraction between terminals according to an embodiment of the presentdisclosure;

FIG. 6 is a schematic structural diagram of an apparatus for secureinteraction between terminals according to an embodiment of the presentdisclosure;

FIG. 7 is a schematic structural diagram of an apparatus for secureinteraction between terminals according to an embodiment of the presentdisclosure;

FIG. 8 is a schematic structural diagram of an apparatus for secureinteraction between terminals according to an embodiment of the presentdisclosure;

FIG. 9 is a schematic structural diagram of an apparatus for secureinteraction between terminals according to an embodiment of the presentdisclosure;

FIG. 10 is a schematic structural diagram of an apparatus for secureinteraction between terminals according to an embodiment of the presentdisclosure;

FIG. 11 is a schematic structural diagram of an apparatus for secureinteraction between terminals according to an embodiment of the presentdisclosure;

FIG. 12 is a schematic structural diagram of an apparatus for secureinteraction between terminals according to an embodiment of the presentdisclosure;

FIG. 13 is a schematic structural diagram of an apparatus for secureinteraction between terminals according to an embodiment of the presentdisclosure;

FIG. 14 is a schematic structural diagram of an apparatus for secureinteraction between terminals according to an embodiment of the presentdisclosure; and

FIG. 15 is a schematic structural diagram of an apparatus for secureinteraction between terminals according to an embodiment of the presentdisclosure.

DESCRIPTION OF EMBODIMENTS

The following describes embodiments of the present disclosure in detailwith reference to accompanying drawings for this specification.

In the embodiments of the present disclosure, a companion terminal maybe a mobile phone, a wearable terminal, a computer, a tablet computer, apersonal digital assistant (PDA), a mobile Internet terminal (MID), anIP phone, a network printer, an electronic book (e-book) reader, or thelike.

Correspondingly, a primary terminal may be a mobile terminal, a wearableterminal, a computer, a tablet computer, a personal digital assistant, amobile Internet terminal, an IP phone, a network printer, an e-bookreader, or the like.

An eUICC is integrated in the companion terminal, and a local profileassistant (LPA) in the companion terminal downloads and manages aprofile in the eUICC. The profile may refer to a combination of a filestructure, data, and an application.

In the embodiments of the present disclosure, the LPA of the companionterminal may have a Web Server enhancement capability such that aservice for browsing information on the Internet can be provided. Inaddition, both the companion terminal and the primary terminal supportone or more of the following protocols of HTTP, a TLS protocol, TCP/IP,and an HTTPS.

In addition, in the embodiments of the present disclosure, both thecompanion terminal and the primary terminal may further support somenon-IP protocols.

In an existing eUICC system architecture, subscription manager datapreparation (SM-DP) is responsible for generating a profile, downloadingthe profile, and installing the profile on the eUICC. The SM-DP may alsobe referred to as a profile installer (or installer). Subscriptionmanager secure routine (SM-SR) is responsible for managing the profileon the eUICC, and ensures security of communication between the eUICCand a remote entity. The SM-SR may also be referred to as a profilemanager (or manager). Subscription manager discovery service (SM-DS)enables the eUICC and a terminal to detect whether there is ato-be-downloaded profile. A mobile network operator (MNO) needs torequest a service from the SM-SR and the SM-DP, for example, ordering aprofile from the SM-DP, and requesting the SM-SR to manage the profileon the eUICC (for example, setting a state of the profile, and deletingthe profile).

In the embodiments of the present disclosure, the companion terminal maybe connected to the primary terminal in a BLUETOOTH manner, or may beconnected to the primary terminal in a WI-FI manner.

For example, the primary terminal enables a WI-FI network sharinghotspot. After detecting the WI-FI network sharing hotspot enabled bythe primary terminal, the companion terminal may access the WI-FInetwork sharing hotspot enabled by the primary terminal using a serviceset identifier (SSID) of the WI-FI network sharing hotspot and a WI-FIkey. After the companion terminal accesses the network sharing hotspotof the primary terminal, the primary terminal may be used as a DynamicHost Configuration Protocol (DHCP) server to configure an IP address forthe companion terminal such that the companion terminal and the primaryterminal may communicate using a local connection (WI-FI).

For example, the primary terminal enables a BLUETOOTH network sharinghotspot. After detecting the BLUETOOTH network sharing hotspot enabledby the primary terminal, the companion terminal accesses, using apersonal identification number (PIN), the BLUETOOTH network sharinghotspot enabled by the primary terminal such that the companion terminaland the primary terminal may communicate using a local connection(BLUETOOTH).

In the embodiments of the present disclosure, the companion terminalfirst initializes the eUICC, for example, powering on, providing a clocksignal, receiving answer to reset (ATR) information, and performing aprepaid service (PPS) procedure.

Based on the foregoing description, FIG. 1 shows a schematic flowchartof a method for secure interaction between terminals according to anembodiment of the present disclosure.

As shown in FIG. 1, the method includes the following steps.

Step 101: A companion terminal with an eUICC indicates or indirectlyindicates an HTTPS URL including security information to a primaryterminal such that the primary terminal establishes a local TLSconnection to the companion terminal based on a certificateauthentication manner according to the HTTPS URL.

In step 101, the security information may be a token generated by thecompanion terminal. The token may be a random number generated by thecompanion terminal.

Alternatively, the security information may be information such as arandom number generated by the companion terminal, and this is notlimited in the present disclosure.

The HTTPS URL generated by the companion terminal may include a usedprotocol name, address information of the companion terminal, andsecurity information. The address information of the companion terminalmay be an IP address.

For example, an LPA of the companion terminal may obtain, using anoperating system (OS) of the companion terminal, an IP address that isallocated by the primary terminal to the companion terminal, andgenerates a token as security information. A transfer protocol specifiedby the companion terminal may be the HTTPS protocol. In this case, thegenerated HTTPS URL may be https://192.168.0.x /LPA? eUICC_accesstoken=xxxxxx. The address information of the companion terminal is192.168.0.x, and a name of the security information is eUICC_accesstoken.

The companion terminal may directly indicate the HTTPS URL including thesecurity information to the primary terminal, or may indirectly indicatethe HTTPS URL including the security information to the primaryterminal.

When the companion terminal directly indicates the HTTPS URL includingthe security information to the primary terminal, the companion terminalmay directly indicate the HTTPS URL to the primary terminal.

For example, the companion terminal may transfer the HTTPS URL to theprimary terminal in a Near Field Communication (NFC) manner.

Alternatively, the companion terminal may display a graph afterconverting the HTTPS URL into the graph in order to indicate the HTTPSURL to the primary terminal. For example, the companion terminal maydisplay a quick response code on a display unit of the companionterminal after converting the HTTPS URL into the quick response codesuch that the primary terminal scans the quick response code displayedby the companion terminal in order to instruct the primary terminal toobtain the HTTPS URL. Certainly, alternatively, the companion terminalmay send the HTTPS URL to the primary terminal after converting theHTTPS URL into a graph.

Alternatively, the companion terminal may indirectly indicate the HTTPSURL including the security information to the primary terminal. Thecompanion terminal directly displays the HTTPS URL, and a user may inputthe displayed HTTPS URL to the primary terminal. Certainly,alternatively, the primary terminal may scan the HTTPS URL displayed bythe companion terminal, and identify, using a character recognitionalgorithm, the HTTPS URL obtained by means of scanning.

Correspondingly, step 201: The primary terminal obtains the HTTPS URLthat includes security information and that is indicated or indirectlyindicated by the companion terminal with an eUICC.

In step 201, with reference to the description of step 101, the primaryterminal may obtain the HTTPS URL in the NFC manner. The primaryterminal may also obtain the HTTPS URL by scanning a graph into whichthe HTTPS URL is converted. For another manner in which the primaryterminal obtains the HTTPS URL, refer to the foregoing description, anddetails are not described herein again.

Step 202: The primary terminal establishes the local TLS connection tothe companion terminal based on the certificate authentication manneraccording to the HTTPS URL, and sends an HTTP request including thesecurity information to the companion terminal using the local TLSconnection such that the companion terminal completes establishment ofan HTTPS session according to the HTTP request after receiving thesecurity information.

In step 202, after the primary terminal obtains the HTTPS URL, the HTTPSsession between the primary terminal and the companion terminal may beestablished according to the HTTPS URL such that an operationinstruction for the eUICC in the companion terminal is sent to thecompanion terminal using the established HTTPS session.

It should be noted that, in this embodiment of the present disclosure,the primary terminal may include a browser with a preset rootcertificate or an application with a preset root certificate such thatthe primary terminal may establish the local TLS connection to thecompanion terminal according to the browser with a preset rootcertificate or the application with a preset root certificate based onthe certificate authentication manner according to the HTTPS URL.

Establishment of an HTTPS session generally includes three steps. In afirst step, a TCP connection is established. The TCP connection is usedto establish a transmission connection between the primary terminal andthe companion terminal, and this step is a step prior to establishmentof a TLS connection. In a second step, the local TLS connection isestablished. Encryption and integrity protection for HTTP transmissiondata are implemented using the TLS connection. In a third step, an HTTPrequest is sent, and an HTTP response is received. After establishmentof the TLS connection is completed, the primary terminal sends an HTTPrequest to the companion terminal using the local TLS connection, afterreceiving the HTTP request, the companion terminal returns an HTTPresponse to the primary terminal, and establishment of an HTTPS sessionis completed after the primary terminal receives the HTTP response.

In the first step, the primary terminal initiates, using addressinformation of the companion terminal in the HTTPS URL, the TCPconnection used for establishing an HTTPS session.

For example, the HTTPS URL is https://192.168.0.x /LPA? eUICC_accesstoken=xx. The primary terminal initiates the TCP connection to thecompanion terminal according to the address information 192.168.0.x.

In the second step, after establishment of the TCP connection iscompleted, the primary terminal initiates a process of establishing alocal TLS connection. In the process of establishing the local TLSconnection, for a purpose of authenticating an identity of the companionterminal, a local TLS connection may be established based on acertificate authentication manner. Further, after sending a TLSconnection establishment request to the companion terminal, the primaryterminal receives a certificate sent by the companion terminal. In thiscase, the primary terminal authenticates the certificate sent by thecompanion terminal according to a CA root certificate of the primaryterminal, and determines that the identity of the companion terminal isauthenticated after the certificate is authenticated. In addition, theprimary terminal completes establishment of the local TLS connectionafter the identity of the companion terminal is authenticated. If theprimary terminal determines that the identity of the companion terminalis not authenticated, the local TLS connection establishment may beterminated.

In the third step, after establishment of the local TLS connection iscompleted, the primary terminal may send the HTTP request including thesecurity information to the companion terminal using the establishedlocal TLS connection in order to complete establishment of an HTTPSsession.

Step 102: The companion terminal receives the HTTP request that is sentby the primary terminal using the local TLS connection, and if thecompanion terminal determines that the HTTP request includes thesecurity information, returns an HTTP response to the primary terminalin order to complete establishment of an HTTPS session.

In step 102, after the companion terminal receives the HTTP request thatis sent by the primary terminal using the local TLS connection, if theHTTP request includes the security information, it is determined thatpermission of the primary terminal is authenticated, and an HTTPresponse is returned to the primary terminal such that establishment ofan HTTPS session is completed, otherwise, the companion terminal refusesthe HTTP request sent by the primary terminal, and then a process ofestablishing the HTTPS session ends.

It should be noted that, in a process of establishing the local TLSconnection, the companion terminal and the primary terminal maynegotiate respective encryption keys and integrity keys. For a processof generating the encryption key and the integrity key and a method forusing the encryption key and the integrity key, refer to stipulations inthe TLS protocol, and details are not described herein.

Step 203: The primary terminal sends an operation instruction for theeUICC to the companion terminal using the HTTPS session.

In step 203, after establishment of an HTTPS session is completed, theprimary terminal may send the operation instruction for the eUICC to thecompanion terminal, for example, an operation such as deleting theprofile from the eUICC, or downloading the profile to the eUICC.

In a process of establishing an HTTPS session, the primary terminalperforms identity authentication on the companion terminal, and thecompanion terminal authenticates permission of the primary terminal. Inaddition, encryption and integrity protection are performed on theoperation instruction transmitted by the primary terminal. Therefore,the companion terminal responds to the operation instruction of theprimary terminal.

Correspondingly, step 103: The companion terminal receives the operationinstruction for the eUICC that is sent by the primary terminal using theHTTPS session.

In step 103, the companion terminal may further send a response messageof the operation instruction for the eUICC to the primary terminal.

In the foregoing solution, the companion terminal with an eUICCauthenticates permission of the primary terminal using the securityinformation. In addition, the primary terminal authenticates an identityof the companion terminal using a certificate of the companion terminalsuch that authentication between the primary terminal and the companionterminal are implemented. In addition, the operation instruction for theeUICC is sent and received between the primary terminal and thecompanion terminal using an HTTPS session, thereby improvingconfidentiality and integrity of an operation command in a transmissionprocess.

Based on the foregoing description, FIG. 2 shows a schematic flowchartof a method for secure interaction between terminals according to anembodiment of the present disclosure.

As shown in FIG. 2, the method includes the following steps.

Step 301: A companion terminal with an eUICC indicates or indirectlyindicates an HTTP URL including first security information to a primaryterminal.

In step 301, the first security information may be a random numbergenerated by the companion terminal, or may be information such as apreset token in the companion terminal, and this is not limited in thepresent disclosure.

A first HTTP URL generated by the companion terminal may include a usedprotocol name, address information of the companion terminal, and thefirst security information. The used protocol name indicated in thefirst HTTP URL may be HTTP, and the address information of the companionterminal may be an IP address.

For example, an LPA in the companion terminal may obtain, using an OS ofthe companion terminal, an IP address that is allocated by the primaryterminal to the companion terminal, and generates a token as the firstsecurity information. In this case, the generated first HTTP URL may behttp://192.168.0.x/LPA? eUICC_access token=xxxxxx. The addressinformation of the companion terminal is 192.168.0.x, and a name of thefirst security information is eUICC_access token.

The companion terminal may directly indicate the first HTTP URL to theprimary terminal, or may indirectly indicate the first HTTP URL to theprimary terminal.

When the companion terminal directly indicates the first HTTP URL to theprimary terminal, the companion terminal may directly send the HTTPS URLto the primary terminal.

For example, the companion terminal may transfer the first HTTP URL tothe primary terminal in an NFC manner.

Alternatively, the companion terminal may display a graph afterconverting the first HTTP URL into the graph in order to indicate thefirst HTTP URL to the primary terminal. For example, the companionterminal may display a quick response code on a display unit of thecompanion terminal after converting the first HTTP URL into the quickresponse code such that the primary terminal scans the quick responsecode displayed by the companion terminal to obtain the first HTTP URL.Certainly, alternatively, the companion terminal may send the first HTTPURL to the primary terminal after converting the first HTTP URL into agraph.

Alternatively, the companion terminal may indirectly indicate the firstHTTP URL to the primary terminal. The companion terminal directlydisplays the first HTTP URL, and a user may input the displayed firstHTTP URL to the primary terminal. Certainly, alternatively, the primaryterminal may scan the first HTTP URL displayed by the companionterminal, and identify, using a character recognition algorithm, thefirst HTTP URL obtained by means of scanning.

Step 401: The primary terminal obtains a first HTTP URL that includesthe first security information and that is indicated or indirectlyindicated by the companion terminal with an eUICC.

In step 401, the primary terminal may obtain, in an NFC manner, thefirst HTTP URL sent by the companion terminal. The primary terminal mayalso obtain the first HTTP URL by scanning a graph into which the firstHTTP URL is converted. For another manner in which the primary terminalobtains the first HTTP URL, refer to the foregoing description, anddetails are not described herein again.

Step 402: The primary terminal sends an HTTP request using the firstHTTP URL to the companion terminal, where the first HTTP URL includesthe first security information.

In step 402, the primary terminal initiates, using the addressinformation of the companion terminal in the HTTP URL, the HTTP requestused for establishing an HTTPS session.

For example, the first HTTP URL is http://192.168.0.x /LPA? eUICC_accesstoken=xx. The primary terminal initiates the HTTP request using theaddress information 192.168.0.x of the companion terminal.

The first HTTP URL including the first security information is carriedin the HTTP request by the primary terminal such that permission of theprimary terminal can be authenticated by the companion terminal. If nofirst HTTP URL including the first security information is carried inthe HTTP request by the primary terminal, or an incorrect first HTTP URLincluding the first security information is carried, the companionterminal considers that the primary terminal does not obtain the firstURL and therefore has no access permission, and no longer responds to amessage sent by the primary terminal. If the first HTTP URL includingthe first security information is carried in the HTTP request by theprimary terminal, the companion terminal may determine, according to thefirst security information, that the permission of the primary terminalis authenticated.

Step 302: If the companion terminal receives the HTTP request that issent by the primary terminal using a first HTTPS URL including the firstsecurity information, the HTTPS URL is returned to the primary terminalsuch that the primary terminal initiates establishment of an HTTPSsession according to the HTTPS URL.

In step 302, after sending the first HTTPS URL to the primary terminal,the companion terminal receives the HTTP request sent by the primaryterminal. If the companion terminal determines that the received HTTPrequest carries the first HTTPS URL including the first securityinformation, the companion terminal determines that the permission ofthe primary terminal is authenticated, and responds to the HTTP requestsent by the primary terminal, otherwise, the companion terminaldetermines that the permission of the primary terminal is notauthenticated, and refuses the HTTP request sent by the primaryterminal.

After the permission of the primary terminal is authenticated, thecompanion terminal may return the HTTPS URL to the primary terminal,where the HTTPS URL is a redirected HTTPS URL such that the primaryterminal initiates establishment of an HTTPS session according to theHTTPS URL.

Optionally, if the companion terminal receives the HTTP request that issent by the primary terminal using the first HTTPS URL including thefirst security information, the companion terminal may further send, tothe primary terminal, a second HTTP URL used for downloading a CA rootcertificate. The primary terminal may download the CA root certificateaccording to the second HTTP URL such that the primary terminalestablishes a local TLS connection to the companion terminal accordingto the CA root certificate based on a certificate authentication manner.

Certainly, alternatively, the CA root certificate may be pre-configuredin the primary terminal, and in this case, the companion terminal maynot need to send the second HTTP URL to the primary terminal.

Optionally, the HTTPS URL sent by the companion terminal may furtherinclude second security information. The second security information maybe information such as a random number or a token generated by thecompanion terminal. The second security information is used toauthenticate the primary terminal after the local TLS connection isestablished.

Step 403: The primary terminal receives the HTTPS URL that is sent bythe companion terminal to the primary terminal according to the HTTPrequest, and establishes the HTTPS session according to the HTTPS URL.

In step 403, establishment of an HTTPS session generally includes threesteps. In a first step, a TCP connection is established. The TCPconnection is used to establish a transmission connection between theprimary terminal and the companion terminal, and this step is a stepprior to establishment of a TLS connection. In a second step, the localTLS connection is established. Encryption and integrity protection forHTTP transmission data are implemented using the TLS connection. In athird step, an HTTP request is sent, and an HTTP response is received.After establishment of the TLS connection is completed, the primaryterminal sends an HTTP request to the companion terminal using the localTLS connection, after receiving the HTTP request, the companion terminalreturns an HTTP response to the primary terminal, and establishment ofan HTTPS session is completed after the primary terminal receives theHTTP response.

In the first step, the primary terminal initiates, using addressinformation of the companion terminal in the HTTPS URL, the TCPconnection used for establishing an HTTPS session.

For example, the HTTPS URL is https://192.168.0.x /LPA? eUICC_accesstoken=xx. The primary terminal initiates the TCP connection to thecompanion terminal according to the address information 192.168.0.x.

In this case, the companion terminal receives a TCP connection requestsent by the primary terminal.

Optionally, after the companion terminal receives the TCP connectionrequest sent by the primary terminal, if the companion terminaldetermines that a source IP address of the TCP connection request sentby the primary terminal is different from a source IP address of theHTTP request returned by the primary terminal according to the firstHTTP URL including the first security information, the companionterminal does not respond to the TCP connection request sent by theprimary terminal, or if the companion terminal determines that thesource IP address of the TCP connection request sent by the primaryterminal is the same as the source IP address of the HTTP requestreturned by the primary terminal according to the first HTTP URLincluding the first security information, the companion terminalresponds to the TCP connection request sent by the primary terminal inorder to complete establishment of the TCP connection.

In the second step, after establishment of the TCP connection iscompleted, the primary terminal initiates a process of establishing alocal TLS connection. In this embodiment of the present disclosure, thelocal TLS connection is established based on a certificateauthentication manner. Further, in the process of establishing the localTLS connection, for a purpose of authenticating an identity of thecompanion terminal, after sending a TLS connection establishment requestto the companion terminal, the primary terminal receives a certificatesent by the companion terminal. In this case, the primary terminalauthenticates the certificate sent by the companion terminal accordingto a CA root certificate of the primary terminal, and determines thatthe identity of the companion terminal is authenticated after thecertificate is authenticated. In addition, the primary terminalcompletes establishment of the local TLS connection after the identityof the companion terminal is authenticated. If the primary terminaldetermines that the identity of the companion terminal is notauthenticated, the local TLS connection establishment may be terminated.

In the third step, after establishment of the local TLS connection iscompleted, the primary terminal may send the HTTP request to thecompanion terminal using the established local TLS connection in orderto complete establishment of an HTTPS session.

Optionally, in the third step, if the HTTPS URL sent by the companionterminal further includes second security information, after the localTLS connection is established, the primary terminal may send an HTTPrequest including the second security information to the companionterminal using the established local TLS connection in order to completeestablishment of an HTTPS session.

If the companion terminal receives the HTTP request that includes thesecond security information and that is sent by the primary terminalusing the local TLS connection, the companion terminal returns an HTTPresponse to the primary terminal to complete establishment of an HTTPSsession in order to respond to an operation instruction for the eUICCthat is sent by the primary terminal. Otherwise, the HTTP request sentby the primary terminal is refused, and then a process of establishingthe HTTPS session ends.

Step 404: The primary terminal sends an operation instruction for theeUICC to the companion terminal using the HTTPS session.

In step 404, the primary terminal may send the operation instruction forthe eUICC to the companion terminal, for example, an operation such asdeleting the profile from the eUICC, or downloading the profile to theeUICC.

In a process of establishing an HTTPS session, the primary terminalauthenticates an identity of the companion terminal, and the companionterminal authenticates a permission of the primary terminal such thatauthentication between the primary terminal and the companion terminalare implemented. Therefore, the companion terminal responds to theoperation instruction of the primary terminal.

Correspondingly, step 303: The companion terminal receives the operationinstruction for the eUICC that is sent by the primary terminal using theHTTPS session.

Likewise, the companion terminal may send a response message of theoperation instruction for the eUICC to the primary terminal using theHTTPS session.

It should be noted that, in this embodiment of the present disclosure,the primary terminal may initiate, using a browser or an applicationthat has a function of a browser and based on address information of thecompanion terminal in an HTTP URL, an HTTP request used for establishingan HTTPS session, and establishes a local TLS connection to thecompanion terminal based on a certificate authentication manner using anHTTPS URL.

Based on the foregoing description, FIG. 3 shows a schematic flowchartof a method for secure interaction between terminals according to anembodiment of the present disclosure.

As shown in FIG. 3, the method includes the following steps.

Step 501: A companion terminal with an eUICC indicates or indirectlyindicates address information and security information of the companionterminal to a primary terminal such that the primary terminalestablishes a local security application session according to theaddress information and the security information.

In step 501, the security information may be a secret key generated bythe companion terminal, or may be key information of a local connectionbetween the companion terminal and the primary terminal. For example, alink key that is used in a BLUETOOTH connection manner is used as thesecurity information, or a WI-FI key that is used in a WI-FI connectionmanner is used as the security information.

The address information of the companion terminal may be an IP address,or may be a Media Access Control (MAC) address of the companionterminal.

The companion terminal may directly indicate the address information andthe security information to the primary terminal, or may indirectlyindicate the address information and the security information to theprimary terminal.

When the companion terminal directly indicates the address informationand the security information to the primary terminal, the companionterminal may directly send the address information and the securityinformation to the primary terminal.

For example, the companion terminal may transfer the address informationand the security information to the primary terminal in an NFC manner.

Alternatively, the companion terminal may display a graph afterconverting the address information and the security information into thegraph, and indicates the address information and the securityinformation to the primary terminal. For example, the companion terminalmay display a quick response code on a display unit of the companionterminal after converting the address information and the securityinformation into the quick response code such that the primary terminalscans the quick response code displayed by the companion terminal toobtain the address information and the security information. Certainly,alternatively, the companion terminal may send the address informationand the security information to the primary terminal after convertingthe address information and the security information into the graph.

For example, the companion terminal may convert the address informationand the security information into an HTTPS URL, and display a quickresponse code on a display unit of the companion terminal afterconverting the HTTPS URL into the quick response code such that theprimary terminal scans the quick response code displayed by thecompanion terminal to obtain the address information and the securityinformation.

The companion terminal may further indicate protocol information to theprimary terminal, such as the HTTPS protocol.

Alternatively, the companion terminal may indirectly indicate theaddress information and the security information to the primaryterminal. The companion terminal directly displays the addressinformation and the security information, and a user may input thedisplayed address information and security information to the primaryterminal. Alternatively, the primary terminal may scan the addressinformation and the security information that are displayed by thecompanion terminal, and identify, using a character recognitionalgorithm, the address information and the security information that areobtained by means of scanning.

Step 601: The primary terminal obtains the address information and thesecurity information that are indicated or indirectly indicated by thecompanion terminal with an eUICC to the primary terminal.

The primary terminal may obtain, in an NFC manner, the addressinformation and the security information that are sent by the companionterminal. The primary terminal may obtain the address information andthe security information by scanning a graph into which the addressinformation and the security information are converted. For anothermanner in which the primary terminal obtains the address information andthe security information, refer to the foregoing description, anddetails are not described herein again.

Step 602: The primary terminal establishes the local securityapplication session according to the address information and thesecurity information.

In step 602, the primary terminal may establish the local securityapplication session between the primary terminal and the companionterminal in multiple manners, and the established local securityapplication session is used to provide encryption and integrityprotection for data between the primary terminal and the companionterminal.

If the security information is a secret key generated by the companionterminal, the secret key may be used as a pre-shared key (also referredas PSK) such that the companion terminal and the primary terminalperform mutual authentication using the pre-shared key and establish thelocal security application session. The pre-shared key is secretinformation that is shared by only the primary terminal and thecompanion terminal, and is used by the companion terminal and theprimary terminal to mutually perform identity authentication and keynegotiation.

For example, the security information is a secret key generated by thecompanion terminal, and the secret key is used as a TLS-PSK. That theestablished local security application session is an HTTPS session isused as an example for detailed description. An HTTPS URL generated bythe companion terminal according to the address information and thesecurity information is https://192.168.0.x /LPA? eUICC_accesstoken=xxxxxx, where the address information of the companion terminal is192.168.0.x, and a name of the security information is eUICC_accesstoken. After obtaining the HTTPS URL generated by the companionterminal, the primary terminal may trigger the HTTPS URL using anapplication in order to initiate establishment of the HTTPS sessionbetween the primary terminal and the companion terminal. The primaryterminal initiates a TCP connection to the companion terminal accordingto the address information 192.168.0.x. After the TCP connection betweenthe primary terminal and the companion terminal is established, aPSK-TLS connection is established between the companion terminal and theprimary terminal. In a process of establishing the PSK-TLS connection,the primary terminal calculates a Pre-Master Secret (or pre-mastersecret key) using the security information. Then the primary terminalmay obtain a Master Secret (or master secret key) according to thePre-Master Secret using a pseudo random function (PRF) algorithm, andfinally the primary terminal obtains a key block according to the MasterSecret using the PRF algorithm such that an encryption key and anintegrity key that are used by the primary terminal and the companionterminal are obtained according to the key block. Correspondingly, thecompanion terminal calculates a key block according to the securityinformation (that is, the secret key generated by the companionterminal) in a manner that is the same as that of the primary terminalsuch that the encryption key and the integrity key that are used by theprimary terminal and the companion terminal are obtained according tothe key block. In addition, the primary terminal and the companionterminal perform mutual authentication according to the TLS-PSK, andestablishment of the PSK-TLS connection is completed after theauthentication succeeds. Finally, the primary terminal sends an HTTPrequest to the companion terminal using the PSK-TLS connection, thecompanion terminal returns an HTTP response to the primary terminalafter receiving the HTTP request, and establishment of the HTTPS sessionis completed after the primary terminal receives the HTTP response.

Key information of a local connection between the primary terminal andthe companion terminal may be used as a pre-shared key, and the primaryterminal and the companion terminal perform mutual authentication usingthe pre-shared key. After the companion terminal and the primaryterminal perform mutual authentication using the key information, ifsecurity information sent by the primary terminal is received,establishment of the local security application session is completed.

For example, the key information of the local connection is used as aTLS-PSK, and that the established local security application session isan HTTPS session is used as an example for detailed description. AnHTTPS URL generated by the companion terminal according to the addressinformation and the security information is https://192.168.0.x /LPA?eUICC_access token=xxxxxx, where the address information of thecompanion terminal is 192.168.0.x, and a name of the securityinformation is eUICC_access token. After the primary terminal obtainsthe HTTPS URL generated by the companion terminal, the primary terminalmay trigger the HTTPS URL using an application in order to initiateestablishment of the HTTPS session between the primary terminal and thecompanion terminal. The primary terminal initiates a TCP connection tothe companion terminal according to the address information 192.168.0.x.After the TCP connection between the primary terminal and the companionterminal is established, a PSK-TLS connection is established between thecompanion terminal and the primary terminal. In a process ofestablishing the TLS connection, the primary terminal uses the keyinformation of the local connection as a TLS-PSK, and calculates a keyblock according to the TLS-PSK such that an encryption key and anintegrity key that are used by the primary terminal and the companionterminal are obtained according to the key block. Correspondingly, thecompanion terminal uses a security key of the local connection assecurity information, and calculates a key block according to thesecurity information in a manner that is the same as that of the primaryterminal such that the encryption key and the integrity key that areused by the primary terminal and the companion terminal are obtainedaccording to the key block. In addition, the primary terminal and thecompanion terminal perform mutual authentication according to theTLS-PSK, and establishment of the PSK-TLS connection is completed afterthe authentication succeeds. Finally, the primary terminal sends an HTTPrequest to the companion terminal using the PSK-TLS connection, ifsecurity information sent by the primary terminal is received, thecompanion terminal returns an HTTP response to the primary terminalafter receiving the HTTP request, and establishment of the HTTPS sessionis completed after the primary terminal receives the HTTP response.

It should be noted that, the foregoing embodiment is described using theIP protocol as an example, and a local security application session maybe established using a non-IP protocol. Details are not describedherein.

Step 603: The primary terminal sends an operation instruction for theeUICC to the companion terminal using the local security applicationsession.

Step 502: The companion terminal receives, using the local securityapplication session, the operation instruction for the eUICC that issent by the primary terminal. It should be noted that, in thisembodiment of the present disclosure, the primary terminal may establishthe local security application session according to an applicationaccording to the address information and the security information.

Based on the foregoing description, FIG. 4 shows a schematic structuraldiagram of an apparatus for secure interaction between terminalsaccording to an embodiment of the present disclosure.

As shown in FIG. 4, the apparatus includes a processor 401 configured toindicate or indirectly indicate an HTTPS URL including securityinformation to a primary terminal such that the primary terminalestablishes a local TLS connection to the companion terminal based on acertificate authentication manner according to the HTTPS URL, and atransceiver 402 configured to receive an HTTP request that is sent bythe primary terminal using the local TLS connection, and if thecompanion terminal determines that the HTTP request includes thesecurity information, return an HTTP response to the primary terminal inorder to complete establishment of an HTTPS session, and receive anoperation instruction for the eUICC that is sent by the primary terminalusing the HTTPS session.

Optionally, the processor 401 is further configured to transfer theHTTPS URL including the security information to the primary terminal,directly display the HTTPS URL including the security information inorder to indirectly indicate the HTTPS URL to the primary terminal, ordisplay a graph of the HTTPS URL including the security information inorder to indirectly indicate the HTTPS URL to the primary terminal.

As shown in FIG. 5, an embodiment of the present disclosure provides aschematic structural diagram of an apparatus for secure interactionbetween terminals, and the apparatus includes a processor 501 configuredto obtain an HTTPS URL that includes security information and that isindicated or indirectly indicated by a companion terminal with an eUICC,and establish a local TLS connection to the companion terminal based ona certificate authentication manner according to the HTTPS URL, send anHTTP request including the security information to the companionterminal using the local TLS connection, and complete establishment ofan HTTPS session after receiving an HTTP response returned by thecompanion terminal, and a transceiver 502 configured to send anoperation instruction for the eUICC to the companion terminal using theHTTPS session.

As shown in FIG. 6, an embodiment of the present disclosure provides aschematic structural diagram of an apparatus for secure interactionbetween terminals, and the apparatus includes a processor 601 configuredto indicate or indirectly indicate an HTTP URL including first securityinformation to a primary terminal, and a transceiver 602 configured toreturn the HTTPS URL to the primary terminal if an HTTP request that issent by the primary terminal using a first HTTPS URL including the firstsecurity information is received such that the primary terminalinitiates establishment of an HTTPS session according to the HTTPS URL,and receive, using the HTTPS session, an operation instruction for theeUICC that is sent by the primary terminal.

Optionally, the processor 601 is further configured to transfer the HTTPURL including the first security information to the primary terminal,directly display the HTTP URL including the first security informationin order to indirectly indicate the HTTP URL to the primary terminal, ordisplay a graph of the HTTP URL including the first security informationin order to indirectly indicate the HTTP URL to the primary terminal.

Optionally, the transceiver 602 is further configured to return, to theprimary terminal, a second HTTP URL used for downloading a CA rootcertificate, where the CA root certificate is used by the primaryterminal to establish a local TLS connection to the companion terminalbased on a certificate authentication manner.

Optionally, the transceiver 602 is further configured to receive a TCPconnection request that is sent by the primary terminal according to theHTTPS URL, and if a source IP address of the TCP connection request isthe same as a source IP address of the HTTP request, respond to the TCPconnection request in order to complete TCP connection establishment.

Optionally, the HTTPS URL includes second security information, and thetransceiver 602 is configured to complete establishment of the HTTPSsession if the second security information sent by the primary terminalis received.

As shown in FIG. 7, an embodiment of the present disclosure provides aschematic structural diagram of an apparatus for secure interactionbetween terminals, and the apparatus includes a processor 701 configuredto obtain a first HTTP URL that includes first security information andthat is indicated or indirectly indicated by a companion terminal withan eUICC, and a transceiver 702 configured to send an HTTP requestincluding the first HTTP URL to the companion terminal, where the firstHTTP URL includes the first security information, receive an HTTPS URLthat is sent by the companion terminal to the primary terminal accordingto the HTTP request, initiate establishment of an HTTPS sessionaccording to the HTTPS URL, and send an operation instruction for theeUICC to the companion terminal using the HTTPS session.

Optionally, the processor 701 is further configured to receive the HTTPURL that includes the first security information and that is transferredby the companion terminal, obtain the HTTP URL using the HTTP URL thatincludes the first security information and that is directly displayedby the companion terminal, or obtain the HTTP URL by scanning a graph ofthe HTTP URL including the first security information.

Optionally, the transceiver 702 is further configured to receive asecond HTTP URL that is used for downloading a CA root certificate andthat is sent by the companion terminal, and establish a local TLSconnection to the companion terminal according to the CA rootcertificate based on a certificate authentication manner.

Optionally, after the primary terminal receives the HTTPS URL that issent by the companion terminal to the primary terminal according to theHTTP request including the first security information, the transceiver702 is further configured to send a TCP connection request to thecompanion terminal according to the HTTPS URL such that the companionterminal responds to the TCP connection request according to a source IPaddress of the TCP connection request and a source IP address of theHTTP request.

Optionally, the HTTPS URL includes second security information, and thetransceiver 702 is configured to send the second security information tothe companion terminal such that the companion terminal completesestablishment of the HTTPS session after receiving the second securityinformation.

As shown in FIG. 8, an embodiment of the present disclosure provides aschematic structural diagram of an apparatus for secure interactionbetween terminals, and the apparatus includes a processor 801 configuredto indicate or indirectly indicate address information and securityinformation of a companion terminal to a primary terminal such that theprimary terminal establishes a local security application sessionaccording to the address information and the security information, and atransceiver 802 configured to receive, using the local securityapplication session, an operation instruction for the eUICC that is sentby the primary terminal.

Optionally, the processor 801 is further configured to transfer theaddress information and the security information to the primaryterminal, directly display the address information and the securityinformation in order to indirectly indicate the address information andthe security information to the primary terminal, or display a graphincluding the address information and the security information in orderto indirectly indicate the address information and the securityinformation to the primary terminal.

Optionally, the security information is used as a pre-shared key suchthat the companion terminal and the primary terminal perform mutualauthentication using the pre-shared key and establish a local securityapplication session.

Optionally, the transceiver 802 is further configured to receive a localsecurity application session request of the primary terminal, and useobtained key information of a local connection as a pre-shared key, andafter the companion terminal and the primary terminal perform mutualauthentication using the pre-shared key, if security information sent bythe primary terminal is received, complete establishment of the localsecurity application session.

As shown in FIG. 9, an embodiment of the present disclosure provides aschematic structural diagram of an apparatus for secure interactionbetween terminals, and the apparatus includes a processor 901 configuredto obtain address information and security information that areindicated or indirectly indicated by a companion terminal with an eUICCto a primary terminal, and establish a local security applicationsession according to the address information and the securityinformation, and a transceiver 902 configured to send an operationinstruction for the eUICC to the companion terminal using the localsecurity application session.

Optionally, the processor 901 is further configured to receive theaddress information and the security information that are transferred bythe companion terminal, obtain the address information and the securityinformation using the address information and the security informationthat are directly displayed by the companion terminal, or obtain theaddress information and the security information by scanning a graphincluding the address information and the security information.

Optionally, the security information is used as a pre-shared key suchthat the primary terminal and the companion terminal perform mutualauthentication using the pre-shared key and establish a local securityapplication session.

Optionally, the processor 901 is further configured to send a localsecurity application session request to the companion terminal, and useobtained key information of a local connection as a pre-shared key, andafter the primary terminal and the companion terminal perform mutualauthentication using the pre-shared key, send the security informationto the companion terminal such that the companion terminal completesestablishment of the local security application session afterdetermining that the security information sent by the primary terminalis received.

As shown in FIG. 10, an embodiment of the present disclosure provides aschematic structural diagram of an apparatus for secure interactionbetween terminals, and the apparatus includes a processing unit 1001configured to indicate or indirectly indicate an HTTPS URL includingsecurity information to a primary terminal such that the primaryterminal establishes a local TLS connection to the companion terminalbased on a certificate authentication manner according to the HTTPS URL,and a transceiver unit 1002 configured to receive an HTTP request thatis sent by the primary terminal using the local TLS connection, if thecompanion terminal determines that the HTTP request includes thesecurity information, return an HTTP response to the primary terminal inorder to complete establishment of an HTTPS session, and receive anoperation instruction for the eUICC that is sent by the primary terminalusing the HTTPS session.

Optionally, the processing unit 1001 is further configured to transferthe HTTPS URL including the security information to the primaryterminal, directly display the HTTPS URL including the securityinformation in order to indirectly indicate the HTTPS URL to the primaryterminal, or display a graph of the HTTPS URL including the securityinformation in order to indirectly indicate the HTTPS URL to the primaryterminal.

As shown in FIG. 11, an embodiment of the present disclosure provides aschematic structural diagram of an apparatus for secure interactionbetween terminals, and the apparatus includes a processing unit 1101configured to obtain an HTTPS URL that includes security information andthat is indicated or indirectly indicated by a companion terminal withan eUICC, and establish a local TLS connection to the companion terminalbased on a certificate authentication manner according to the HTTPS URL,send an HTTP request including the security information to the companionterminal using the local TLS connection, and complete establishment ofan HTTPS session after receiving an HTTP response returned by thecompanion terminal, and a transceiver unit 1102 configured to send anoperation instruction for the eUICC to the companion terminal using theHTTPS session.

As shown in FIG. 12, an embodiment of the present disclosure provides aschematic structural diagram of an apparatus for secure interactionbetween terminals, and the apparatus includes a processing unit 1201configured to indicate or indirectly indicate an HTTP URL includingfirst security information to a primary terminal, and a transceiver unit1202 configured to if an HTTP request that is sent by the primaryterminal using a first HTTPS URL including the first securityinformation is received, return the HTTPS URL to the primary terminalsuch that the primary terminal initiates establishment of an HTTPSsession according to the HTTPS URL, and receive, using the HTTPSsession, an operation instruction for the eUICC that is sent by theprimary terminal.

Optionally, the processing unit 1201 is further configured to transferthe HTTP URL including the first security information to the primaryterminal, directly display the HTTP URL including the first securityinformation in order to indirectly indicate the HTTP URL to the primaryterminal, or display a graph of the HTTP URL including the firstsecurity information in order to indirectly indicate the HTTP URL to theprimary terminal.

Optionally, the transceiver unit 1202 is further configured to return,to the primary terminal, a second HTTP URL used for downloading a CAroot certificate, where the CA root certificate is used by the primaryterminal to establish a local TLS connection to the companion terminalbased on a certificate authentication manner.

Optionally, the transceiver unit 1202 is further configured to receive aTCP connection request that is sent by the primary terminal according tothe HTTPS URL, and if a source IP address of the TCP connection requestis the same as a source IP address of the HTTP request, respond to theTCP connection request in order to complete TCP connectionestablishment.

Optionally, the HTTPS URL includes second security information, and thetransceiver unit 1202 is configured to complete establishment of theHTTPS session if the second security information sent by the primaryterminal is received.

As shown in FIG. 13, an embodiment of the present disclosure provides aschematic structural diagram of an apparatus for secure interactionbetween terminals, and the apparatus includes a processing unit 1301configured to obtain a first HTTP URL that includes first securityinformation and that is indicated or indirectly indicated by a companionterminal with an eUICC, and a transceiver unit 1302 configured to sendan HTTP request including the first HTTP URL to the companion terminal,where the first HTTP URL includes the first security information, andreceive an HTTPS URL that is sent by the companion terminal to theprimary terminal according to the HTTP request, and initiateestablishment of an HTTPS session according to the HTTPS URL, and sendan operation instruction for the eUICC to the companion terminal usingthe HTTPS session.

Optionally, the processing unit 1301 is further configured to receivethe HTTP URL that includes the first security information and that istransferred by the companion terminal, obtain the HTTP URL using theHTTP URL that includes the first security information and that isdirectly displayed by the companion terminal, or obtain the HTTP URL byscanning a graph of the HTTP URL including the first securityinformation.

Optionally, the transceiver unit 1302 is further configured to receive asecond HTTP URL that is used for downloading a CA root certificate andthat is sent by the companion terminal, and establish a local TLSconnection to the companion terminal according to the CA rootcertificate based on a certificate authentication manner.

Optionally, after the primary terminal receives the HTTPS URL that issent by the companion terminal to the primary terminal according to theHTTP request including the first security information, the transceiverunit 1302 is further configured to send a TCP connection request to thecompanion terminal according to the HTTPS URL such that the companionterminal responds to the TCP connection request according to a source IPaddress of the TCP connection request and a source IP address of theHTTP request.

Optionally, the HTTPS URL includes second security information, and thetransceiver unit 1302 is configured to send the second securityinformation to the companion terminal such that the companion terminalcompletes establishment of the HTTPS session after receiving the secondsecurity information.

As shown in FIG. 14, an embodiment of the present disclosure provides aschematic structural diagram of an apparatus for secure interactionbetween terminals, and the apparatus includes a processing unit 1401configured to indicate or indirectly indicate address information andsecurity information of a companion terminal to a primary terminal suchthat the primary terminal establishes a local security applicationsession according to the address information and the securityinformation, and a transceiver unit 1402 configured to receive, usingthe local security application session, an operation instruction for theeUICC that is sent by the primary terminal.

Optionally, the processing unit 1401 is further configured to transferthe address information and the security information to the primaryterminal, or directly display the address information and the securityinformation in order to indirectly indicate the address information andthe security information to the primary terminal, or display a graphincluding the address information and the security information in orderto indirectly indicate the address information and the securityinformation to the primary terminal.

Optionally, the security information is used as a pre-shared key suchthat the companion terminal and the primary terminal perform mutualauthentication using the pre-shared key and establish a local securityapplication session.

Optionally, the transceiver unit 1402 is further configured to receive alocal security application session request of the primary terminal, anduse obtained key information of a local connection as a pre-shared key,and after the companion terminal and the primary terminal perform mutualauthentication using the pre-shared key, if security information sent bythe primary terminal is received, complete establishment of the localsecurity application session.

As shown in FIG. 15, an embodiment of the present disclosure provides aschematic structural diagram of an apparatus for secure interactionbetween terminals, and the apparatus includes a processing unit 1501configured to obtain address information and security information thatare indicated or indirectly indicated by a companion terminal with aneUICC to a primary terminal, and establish a local security applicationsession according to the address information and the securityinformation, and a transceiver unit 1502 configured to send an operationinstruction for the eUICC to the companion terminal using the localsecurity application session.

Optionally, the processing unit 1501 is further configured to receivethe address information and the security information that aretransferred by the companion terminal, or obtain the address informationand the security information using the address information and thesecurity information that are directly displayed by the companionterminal, or obtain the address information and the security informationby scanning a graph including the address information and the securityinformation.

Optionally, the security information is used as a pre-shared key suchthat the primary terminal and the companion terminal perform mutualauthentication using the pre-shared key and establish a local securityapplication session.

Optionally, the processing unit 1501 is further configured to send alocal security application session request to the companion terminal,and use obtained key information of a local connection as a pre-sharedkey, and after the primary terminal and the companion terminal performmutual authentication using the pre-shared key, send the securityinformation to the companion terminal such that the companion terminalcompletes establishment of the local security application session afterdetermining that the security information sent by the primary terminalis received.

A person skilled in the art should understand that the embodiments ofthe present disclosure may be provided as a method, a system, or acomputer program product. Therefore, the present disclosure may use aform of hardware only embodiments, software only embodiments, orembodiments with a combination of software and hardware. In addition,the present disclosure may use a form of a computer program product thatis implemented on one or more computer-usable storage media (includingbut not limited to a disk memory and an optical memory) that includecomputer-usable program code.

The present disclosure is described with reference to the flowchartsand/or block diagrams of the method, the terminal (system), and thecomputer program product according to the embodiments of the presentdisclosure. It should be understood that computer program instructionsmay be used to implement each process and/or each block in theflowcharts and/or the block diagrams and a combination of a processand/or a block in the flowcharts and/or the block diagrams. Thesecomputer program instructions may be provided for a general-purposecomputer, a dedicated computer, an embedded processor, or a processor ofany other programmable data processing terminal to generate a machineinstruction such that the instructions executed by a computer or aprocessor of any other programmable data processing terminal generate anapparatus for implementing a specific function in one or more processesin the flowcharts and/or in one or more blocks in the block diagrams.

These computer program instructions may also be stored in a computerreadable memory that can instruct the computer or any other programmabledata processing terminal to work in a specific manner such that theinstructions stored in the computer readable memory generate an artifactthat includes an instruction apparatus. The instruction apparatusimplements a specific function in one or more processes in theflowcharts and/or in one or more blocks in the block diagrams.

These computer program instructions may also be loaded onto a computeror another programmable data processing terminal such that a series ofoperations and steps are performed on the computer or the otherprogrammable terminal, thereby generating computer-implementedprocessing. Therefore, the instructions executed on the computer or theother programmable terminal provide steps for implementing a specificfunction in one or more processes in the flowcharts and/or in one ormore blocks in the block diagrams.

Obviously, a person skilled in the art can make various modificationsand variations to the present disclosure without departing from thespirit and scope of the present disclosure. The present disclosure isintended to cover these modifications and variations of the presentdisclosure provided that they fall within the scope of protectiondefined by the following claims and their equivalent technologies.

What is claimed is:
 1. A method for secure interaction betweenterminals, comprising: generating, by a companion terminal with anEmbedded Universal Integrated Circuit Card (eUICC), a Hypertext TransferProtocol (HTTP) over Secure Socket Layer (HTTPS) Uniform ResourceLocator (URL) including address information of the companion terminaland security information of the companion terminal; indicating orindirectly indicating, by the companion terminal to a primary terminal,the HTTPS URL including the address information of the companionterminal and the security information of the companion terminal toestablish a local security application session between the primaryterminal and the companion terminal according to the address informationand the security information; receiving, by the companion terminal, anHTTP request from the primary terminal using the local securityapplication session; sending, by the companion terminal, an HTTPresponse to the primary terminal after receiving the HTTP request,wherein an HTTPS session is established between the companion terminaland the primary terminal using the security information; and receiving,by the companion terminal using the HTTPS session, an operationinstruction for the eUICC from the primary terminal.
 2. The method ofclaim 1, wherein indicating or indirectly indicating the HTTPS URL tothe primary terminal comprises: transferring, by the companion terminal,the address information and the security information to the primaryterminal; directly displaying, by the companion terminal, the addressinformation and the security information to indirectly indicate theaddress information and the security information to the primaryterminal; or displaying, by the companion terminal, a graph comprisingthe address information and the security information to indirectlyindicate the address information and the security information to theprimary terminal.
 3. The method of claim 1, wherein the securityinformation is used as a pre-shared key to enable the companion terminaland the primary terminal to perform mutual authentication using thepre-shared key and to establish the local security application session.4. The method of claim 1, wherein after indicating or indirectlyindicating the HTTPS URL to the primary terminal, the method furthercomprises: receiving, by the companion terminal, a local securityapplication session request of the primary terminal; using, by thecompanion terminal, obtained key information of a local coupling as apre-shared key; and completing, by the companion terminal, establishmentof the local security application session after the companion terminaland the primary terminal perform mutual authentication using thepre-shared key and when the security information from the primaryterminal is received.
 5. A method for secure interaction betweenterminals, comprising: indirectly or directly obtaining, by a primaryterminal, a Hypertext Transfer Protocol (HTTP) over Secure Socket Layer(HTTPS) Uniform Resource Locator (URL) including address information ofa companion terminal and security information of the companion terminal;establishing, by the primary terminal, a local security applicationsession between the primary terminal and the companion terminalaccording to the address information and the security information;sending, by the primary terminal, an HTTP request to the companionterminal using the local security application session; receiving, by theprimary terminal, an HTTP response from the companion terminal aftersending the HTTP request, wherein an HTTPS session is establishedbetween the companion terminal and the primary terminal using thesecurity information; and sending, by the primary terminal, an operationinstruction for the eUICC to the companion terminal using the HTTPSsession.
 6. The method of claim 5, wherein obtaining the HTTPS URLcomprises: receiving, by the primary terminal, the address informationand the security information that are transferred by the companionterminal; obtaining, by the primary terminal, the address informationand the security information using the address information and thesecurity information that are directly displayed by the companionterminal; or obtaining, by the primary terminal, the address informationand the security information by scanning a graph comprising the addressinformation and the security information.
 7. The method of claim 5,wherein the security information is used as a pre-shared key to enablethe primary terminal and the companion terminal to perform mutualauthentication using the pre-shared key and to establish the localsecurity application session.
 8. The method of claim 5, whereinestablishing the local security application session comprises: sending,by the primary terminal, a local security application session request tothe companion terminal; using obtained key information of a localcoupling as a pre-shared key; and sending the security information tothe companion terminal after the primary terminal and the companionterminal perform mutual authentication using the pre-shared key toenable the companion terminal to complete establishment of the localsecurity application session.
 9. A companion terminal for secureinteraction between terminals, the companion terminal comprising: anEmbedded Universal Integrated Circuit Card (eUICC); a processor coupledto the eUICC and configured to cause the companion terminal to: generatea Hypertext Transfer Protocol (HTTP) over Secure Socket Layer (HTTPS)Uniform Resource Locator (URL) including address information of thecompanion terminal and security information of the companion terminal;and indicate or indirectly indicate the HTTPS URL including the addressinformation of the companion terminal and the security information ofthe companion terminal to a primary terminal to establish a localsecurity application session between the primary terminal and thecompanion terminal according to the address information and the securityinformation; and a transceiver coupled to the processor and configuredto: receive an HTTP request from the primary terminal using the localsecurity application session; send an HTTP response to the primaryterminal after receiving the HTTP request, wherein an HTTPS session isestablished between the companion terminal and the primary terminalusing the security information; and receive, using the HTTPS session, anoperation instruction for an Embedded Universal Integrated Circuit Card(eUICC) from the primary terminal.
 10. The companion terminal of claim9, wherein the processor is further configured to: transfer the addressinformation and the security information to the primary terminal;directly display the address information and the security information,so as to indirectly indicate the address information and the securityinformation to the primary terminal; or display a graph comprising theaddress information and the security information, so as to indirectlyindicate the address information and the security information to theprimary terminal.
 11. The companion terminal of claim 9, wherein thesecurity information is used as a pre-shared key to enable the companionterminal and the primary terminal to perform mutual authentication usingthe pre-shared key and to establish the local security applicationsession.
 12. The companion terminal of claim 9, wherein the transceiveris further configured to: receive a local security application sessionrequest of the primary terminal; use obtained key information of a localcoupling as a pre-shared key; and complete establishment of the localsecurity application session after the companion terminal and theprimary terminal perform mutual authentication using the pre-shared keyand when the security information from the primary terminal is received.13. The method of claim 1, wherein indicating or indirectly indicatingthe HTTPS URL to the primary terminal comprises displaying, by thecompanion terminal, the HTTPS URL.
 14. The method of claim 1, whereinindicating or indirectly indicating the HTTPS URL to the primaryterminal comprises displaying, by the companion terminal, a graphcomprising the address information and the security information.
 15. Themethod of claim 5, wherein obtaining the HTTPS URL comprises obtainingthe HTTPS URL after the HTTPS URL is displayed by the companionterminal.
 16. The method of claim 5, wherein obtaining the HTTPS URLcomprises scanning a graph comprising the address information and thesecurity information.
 17. The apparatus of claim 9, wherein theprocessor is configured to cause the companion terminal to indicate orindirectly indicate the HTTPS URL to the primary terminal by causing thecompanion terminal to display the address information and the securityinformation.
 18. The apparatus of claim 9, wherein the processor isconfigured to cause the companion terminal to indicate or indirectlyindicate the HTTPS URL to the primary terminal by causing the companionterminal to display a graph comprising the address information and thesecurity information.
 19. The method of claim 1, wherein both thecompanion terminal and the primary terminal are mobile devices.
 20. Themethod of claim 19, wherein both the primary terminal and the companionterminal are mobile phones.